<?php
class Appversion_m extends CI_Model{
	function __construct(){
		parent::__construct();
		$this->load->database();
	}
	
	function query($code){
		if(isset($code)){
			$res=$this->db->query('select * from app_version where code>'.$code);
		}else{
			$res=$this->db->query('select * from app_version order by code desc limit 1');
		}
		return $res->result();
	}
}